using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;

namespace WebUpdaterAdminCore.Data.Migrations
{
    public partial class modify20180620 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "FileUploadInfos",
                columns: table => new
                {
                    Id = table.Column<string>(nullable: false),
                    FileName = table.Column<string>(nullable: true),
                    FilePath = table.Column<string>(nullable: true),
                    FileSize = table.Column<long>(nullable: false),
                    UploadDate = table.Column<DateTime>(nullable: false),
                    UploadUser = table.Column<string>(nullable: true),
                    SiteName = table.Column<string>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_FileUploadInfos", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "WebSiteInfoExtends",
                columns: table => new
                {                    
                    SiteId = table.Column<string>(nullable:false),
                    SiteName = table.Column<string>(nullable: true),
                    WebPacketUrl = table.Column<string>(nullable: true),
                    WebPackMd5 = table.Column<string>(nullable: true),
                    WebAssemblyFileName = table.Column<string>(nullable: true),
                    WebVersion = table.Column<string>(nullable: true),
                    ExecuteCommands = table.Column<string>(nullable: true),
                    TestAction = table.Column<string>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_WebSiteInfoExtends", x => x.SiteId);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "FileUploadInfos");

            migrationBuilder.DropTable(
                name: "WebSiteInfoExtends");
        }
    }
}
